package com.example.victory.swagger.model;

import com.fasterxml.jackson.annotation.JsonValue;

import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * 风险评级，谨慎型、积极型、激进型、稳健型、保守型
 */
public enum RiskRatingEnum {
  
  CAUTIOUS("CAUTIOUS"),
  
  ACTIVE("ACTIVE"),
  
  RADICAL("RADICAL"),
  
  DOVISH("DOVISH"),
  
  CONSERVATIVE("CONSERVATIVE");

  private String value;

  RiskRatingEnum(String value) {
    this.value = value;
  }

  @Override
  @JsonValue
  public String toString() {
    return String.valueOf(value);
  }

  @JsonCreator
  public static RiskRatingEnum fromValue(String text) {
    for (RiskRatingEnum b : RiskRatingEnum.values()) {
      if (String.valueOf(b.value).equals(text)) {
        return b;
      }
    }
    return null;
  }
}

